<?php
/**
 * 界面挂件
 * User: yepanpan
 * Date: 2017/12/25
 * Time: 17:31
 */

namespace Todo\Widget;
use Think\Controller;
use Todo\Service\AccessService;

class UIWidget extends Controller
{
    /**
     * 工具栏
     * @param $title string 对象名称
     * @param $bars array 按钮数组
     */
    public function toolbar($title, $bars){
        if(C('DEV_MODE')) AccessService::getInstance()->addAccess($title, $bars);
        $this->assign('bars', $bars);
        $this->assign('title', $title);
        $this->display('./Common/View/Widget/ui_toolbar.html');
    }

}